home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / tcl / xf2.3-p / xf2 / xf2.3 / src / xfprocHelp.tcl < prev    next >
Encoding:
Text File  |  1993-11-20  |  2.0 KB  |  78 lines

  1. # Program: xf
  2. # Description: procedures that implement the help functionality
  3. #
  4. # $Header: xfprocHelp.tcl[2.4] Wed Mar 10 12:07:53 1993 garfield@garfield frozen $
  5.  
  6. proc XFProcHelpAbout {} {
  7. ##########
  8. # Procedure: XFProcHelpAbout
  9. # Description: show the about box
  10. # Arguments: none
  11. # Returns: none
  12. # Sideeffects: none
  13. ##########
  14.   global xfAlertBox
  15.   global xfPath
  16.  
  17.   foreach xfHelpElement [split $xfPath(helps) :] {
  18.     if {[file exists $xfHelpElement/XF/About.H]} {
  19.       set xfAlertBox(toplevelName) .about
  20.       XFProcMessageFile $xfHelpElement/XF/About.H 290x240 {XF about} center {}
  21.       set xfAlertBox(toplevelName) .xfAlertBox
  22.     }
  23.   }
  24. }
  25.  
  26. proc XFProcHelpHelp {args} {
  27. ##########
  28. # Procedure: XFProcHelpHelp
  29. # Description: show help in a external wish
  30. # Arguments: args - the section (page) to show
  31. # Returns: none
  32. # Sideeffects: none
  33. ##########
  34.   global env
  35.   global xfPath
  36.  
  37.   set xfArgs [split [string trimright [string trimleft $args \{] \}]]
  38.   if {"[lindex $xfArgs 0]" == "General" ||
  39.       [llength $xfArgs] == 0} {
  40.     set xfHelpTopic "XF/XF"
  41.   } {
  42.     if {[llength $xfArgs] == 1} {
  43.       set xfHelpTopic "XF/$args"
  44.     } {
  45.       set xfHelpTopic "$args"
  46.     }
  47.   }
  48.   regsub -all " " $xfHelpTopic "/" xfHelpTopic
  49.   set env(XF_HELP_DIR) $xfPath(helps)
  50.   if {[catch "exec true; exec xfhelp $xfHelpTopic &" xfResult]} {
  51.     XFProcError $xfResult
  52.   }
  53. }
  54.  
  55. proc XFProcHelpTutorial {} {
  56. ##########
  57. # Procedure: XFProcHelpTutorial
  58. # Description: start tutorial
  59. # Arguments: none
  60. # Returns: none
  61. # Sideeffects: none
  62. ##########
  63.  
  64.   global xfConf
  65.   global xfPath
  66.  
  67.   if {[XFProcYesNo "Running the tutorial will erase your current work.\n Is this ok ?"]} {
  68.     if {$xfConf(kanji)} {
  69.       catch "exec true; exec $xfConf(interpreterTut) -name \"XF-tutorial\" -file $xfPath(base)/xftutorial/xftutorial.tcl $xfPath(base)/xftutorial/script.xfjp [winfo name .] &"
  70.     } {
  71.       catch "exec true; exec $xfConf(interpreterTut) -name \"XF-tutorial\" -file $xfPath(base)/xftutorial/xftutorial.tcl $xfPath(base)/xftutorial/script.xf [winfo name .] &"
  72.     }
  73.   }
  74. }
  75.  
  76. # eof
  77.  
  78.